package jpa.entitys.promis.common;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;

import jpa.entitys.common.CommonEntity;


/**
 * The persistent class for the COST_ARTICLE_SUB_GROUP database table.
 * 
 */
@Entity
@Table(name="COST_ARTICLE_SUB_GROUP")
@NamedQueries({
    @NamedQuery(name = "CostArticleSubGroup.findAll", query = " SELECT c FROM CostArticleSubGroup c "),
    @NamedQuery(name = "CostArticleSubGroup.findById", query = " SELECT c FROM CostArticleSubGroup c WHERE c.id = :Id "),
    @NamedQuery(name = "CostArticleSubGroup.findByArticleType", query = " SELECT c FROM CostArticleSubGroup c WHERE c.articleType = :articleType ")
})
public class CostArticleSubGroup extends CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private CostArticleSubGroupPK id;

	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}
	
	@Column(name="ARTICLE_TYPE", length=1)
	private String articleType;

	@Column(name="CREATED_BY")
	private String createdBy;

    @Temporal( TemporalType.DATE)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(length=300)
	private String description;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

    @Temporal( TemporalType.DATE)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="REF_ARTICLE_GROUP")
	private String refArticleGroup;

	@Column(name="REF_ARTICLE_SUB_GROUP")
	private String refArticleSubGroup;

	@Column(name="REF_ARTICLE_TYPE", length=1)
	private String refArticleType;

	@Column(name="SEQ_NO", precision=22)
	private BigDecimal seqNo;

	@Column(name="SYNC_CREATEDBY", length=100)
	private String syncCreatedby;

    @Temporal( TemporalType.DATE)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_EXTERNAL_REF_KEY", length=100)
	private String syncExternalRefKey;

	@Column(name="SYNC_EXTERNAL_REF_NO", length=100)
	private String syncExternalRefNo;

	@Column(name="SYNC_ISSYNC", length=1)
	private String syncIssync;

	@Column(name="SYNC_UPDATEDBY", length=100)
	private String syncUpdatedby;

    @Temporal( TemporalType.DATE)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="TMP_UM", length=30)
	private String tmpUm;

	//bi-directional many-to-one association to CostArticleGroup
    @ManyToOne
	@JoinColumn(name="ARTICLE_GROUP", nullable=false, insertable=false, updatable=false)
	private CostArticleGroup costArticleGroup;

    public CostArticleSubGroup() {
    }

	public CostArticleSubGroupPK getId() {
		return this.id;
	}

	public void setId(CostArticleSubGroupPK id) {
		this.id = id;
	}
	
	public String getArticleType() {
		return this.articleType;
	}

	public void setArticleType(String articleType) {
		this.articleType = articleType;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public String getRefArticleGroup() {
		return this.refArticleGroup;
	}

	public void setRefArticleGroup(String refArticleGroup) {
		this.refArticleGroup = refArticleGroup;
	}

	public String getRefArticleSubGroup() {
		return this.refArticleSubGroup;
	}

	public void setRefArticleSubGroup(String refArticleSubGroup) {
		this.refArticleSubGroup = refArticleSubGroup;
	}

	public String getRefArticleType() {
		return this.refArticleType;
	}

	public void setRefArticleType(String refArticleType) {
		this.refArticleType = refArticleType;
	}

	public BigDecimal getSeqNo() {
		return this.seqNo;
	}

	public void setSeqNo(BigDecimal seqNo) {
		this.seqNo = seqNo;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncExternalRefKey() {
		return this.syncExternalRefKey;
	}

	public void setSyncExternalRefKey(String syncExternalRefKey) {
		this.syncExternalRefKey = syncExternalRefKey;
	}

	public String getSyncExternalRefNo() {
		return this.syncExternalRefNo;
	}

	public void setSyncExternalRefNo(String syncExternalRefNo) {
		this.syncExternalRefNo = syncExternalRefNo;
	}

	public String getSyncIssync() {
		return this.syncIssync;
	}

	public void setSyncIssync(String syncIssync) {
		this.syncIssync = syncIssync;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public String getTmpUm() {
		return this.tmpUm;
	}

	public void setTmpUm(String tmpUm) {
		this.tmpUm = tmpUm;
	}

	public CostArticleGroup getCostArticleGroup() {
		return this.costArticleGroup;
	}

	public void setCostArticleGroup(CostArticleGroup costArticleGroup) {
		this.costArticleGroup = costArticleGroup;
	}
	
}